package com.finance.pojo;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * @Author: Apollo
 * @Date: 2021/4/17
 * @Description: 申请贷款
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "apply_for_loan")
public class ApplyForLoan implements Serializable {

    /**
     * 主键
     */
    private Integer id;

    /**
     * 标识
     */
    @TableId(type = IdType.ASSIGN_ID)
    @TableField(fill = FieldFill.INSERT)
    private String code;

    /**
     * 申请贷款时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;

    /**
     * 是否删除 1:否 2:是
     */
    private Integer isDelete;

    /**
     * 贷款产品名称
     */
    private String loanProductName;

    /**
     * 贷款金额
     */
    private Double loanAmount;

    /**
     * 贷款期数
     */
    private Integer loanPeriods;

    /**
     * 是否同意协议 1:同意 2:不同意
     */
    private Integer isConsentAgreement;

    /**
     * 状态
     */
    private Integer status;

    /**
     * 借款人信息标识
     */
    private String borrowerInfoCode;







    private static final long serialVersionUID = 1L;

    public static final String COL_ID = "id";

    public static final String COL_CODE = "code";

    public static final String COL_CREATE_TIME = "create_time";

    public static final String COL_IS_DELETE = "is_delete";

    public static final String COL_LOAN_PRODUCT_NAME = "loan_product_name";

    public static final String COL_LOAN_AMOUNT = "loan_amount";

    public static final String COL_LOAN_PERIODS = "loan_periods";

    public static final String COL_IS_CONSENT_AGREEMENT = "is_consent_agreement";

    public static final String COL_STATUS = "status";

    public static final String COL_BORROWER_INFO_CODE = "borrower_info_code";


    /**
     * 协议信息
     */
    @TableField(exist = false)
    private Agreement agreement;

    /**
     * 贷款产品附件信息
     */
    @TableField(exist = false)
    private AccessoryLoanProductInfo accessoryLoanProductInfo;

    /**
     * 分配记录
     */
    @TableField(exist = false)
    private RecordAllocation recordAllocation;

    /**
     * 放款记录
     */
    @TableField(exist = false)
    private RecordLoanInfo recordLoanInfo;

    /**
     * 还款计划
     */
    @TableField(exist = false)
    private RepaymentSchedule repaymentSchedule;



}